<?php
namespace app\admin\validate;
use think\validate;

class Cate extends Validate
{  
    protected $rule=[
        'cetename'=>'require|max:25|unique:cate',
        
    ];

    protected $message = [
        'catename.require'=>'小可爱名称必须填写哦',
        'catename.max' =>'小可爱名称长度不可以大于25位哦~~~~',
        'username.unique'=>'名称不可重复',
      

    ];

    protected $scene = [
        'add'=>['catename'=>'require|unique:cate'],
        'edit'=>['catename'=>'require|unique:cate'],
    ];
}

?>